package com.borko.healthcare.tapestry.pages;

import org.apache.tapestry5.PersistenceConstants;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SetupRender;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.Cookies;

public class Welcome {
	
	@Inject
	private Cookies cookies;
	
	@Property
	@Persist(PersistenceConstants.FLASH)
	private String userFullName;
	
	@SetupRender
	public void initialize() {
		if (userFullName == null) {
			userFullName = cookies.readCookieValue("userFullName");
		}
	}

}
